package com.ai.mall.service;

import com.ai.mall.entity.OrdersEntity;
import com.ai.mall.entity.UsersEntity;
import com.ai.mall.utils.PageUtils;
import com.ai.mall.utils.R;
import com.ai.mall.vo.req.OrderSubmitRequest;
import com.ai.mall.vo.res.OrderVO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * 订单表
 *
 * @author easue
 * @email sunlightcs@gmail.com
 * @date 2025-01-21 14:40:34
 */
public interface OrdersService extends IService<OrdersEntity> {

    PageUtils queryPage(Map<String, Object> params);

    R submitOrder(OrderSubmitRequest orderSubmitRequest, UsersEntity userInfo);

    boolean cancelOrder(Integer id);

    List<OrderVO> getPendingPaymentOrders(UsersEntity userInfo);

    List<OrderVO> getPendingReceiptOrders(UsersEntity userInfo);

    List<OrderVO> getPendingReviewOrders(UsersEntity userInfo);

    List<OrderVO> getAllOrders(UsersEntity userInfo);

    void confirmReceipt(Integer orderId);

    void goPay(Integer orderId, UsersEntity userInfo);
}

